// Import LESS Files
//===================================================================
@import "main/mixins.less";
@import "main/colors.less";

.rtl {
	direction:rtl!important;
	
	.pull-right {
		float:left !important;
	}

	.pull-left {
		float:right !important;
	}
	
	.text-right {
		text-align: left !important;
	}
	
	.text-left {
		text-align: right !important;
	}
	
	.breadcrumb {

		li {
			margin-left: 20px;
			margin-right: auto;
		}

		> li + li:before {
			left: 0;
			right: -12px;	
		}

		> .active {
			color: @border;
		}	
	}
	
	.pace .pace-activity {
		left: 15px;
		right: auto;
	}
		
	
	.navbar {	
		padding: 0 @sidebar-width - 15px 0 0;
		
		.navbar-right {
			float:left !important;
		}

		.navbar-left {
			float:right !important;
		}
		
		.navbar-nav {
			li {
				float: right;
				
				a {
					border-left: none !important;
					border-right: 1px solid darken(@main,10%) !important;
				}
				
				.dropdown-menu {
					right:auto !important; left:0 !important;
					
					&:after {
					  	top: -7px;
					  	left: 16px;
						right: auto;
					}

					&:before {
						top: -9.5px;
						left: 16px;
						right: auto;
					}
					
					li {

						i {
							font-size: 14px;
						}	

						a {
							
							img.avatar {
								height: 40px;
								.border-radius(50em);
								border: 1px solid @border;
								margin: 0px -5px 0 10px;
								float: right;
							}

							.label {
								left: 10px;
								right: auto;
							}

							i {
								margin: 0 -5px 0 10px;
							}
						}
						
						&.avatar {
							min-width: 250px;
						}				
					}
				}
			}
		}
		
		.navbar-actions {		
			a {
				border-left: 1px solid darken(@main,10%) !important;
				border-right: none;
			}		
		}
		
		.navbar-form {	
			border-left: 1px solid darken(@main,10%);
			border-right: 1px solid darken(@main,10%);
		}
	}
	
	.sidebar { 
		position: fixed;
		left: auto;
		right: 0 !important;
		
		.sidebar-header {
			img {
				float: right;
				margin: 0 0 0 10px;
			}
			
			.user-menu {
				left: 0 !important;
				right: auto !important;		
			}
		}
		
		ul.nav.nav-sidebar {
			li {
				a {	
					i {
						margin: 0 0 0 20px;
					}
					.indicator {
						left: 20px !important;
						right: auto !important;
					}
				}
			}
		}
		
		.sidebar-footer {
			bottom: 0;
			left: auto;
			right: 0;

			ul.sidebar-footer-menu {
				
				li {

					&:last-child {
						border-right: 1px solid lighten(@sidebar, 3%);
					}
				}
			}		
		}
	}
	
	.main {
		padding: 90px @sidebar-width + 30px 0 30px;
	}
	
	.panel {
		.panel-heading {
			.pull-right {
				float:left !important;
			}

			.pull-left {
				float:right !important;
			}
			.panel-actions {
				float: left;
				margin-left: -15px;
				margin-right: auto;
				border-right: 1px solid white;
				border-left: none;
				
				a {
					border-left: none;
					border-right: 1px solid @border;
				}
			}
			.nav-tabs {
				float: left;
				margin-right: auto;
				margin-left: -1px;
				border: none;

				li {
					border: none;

					a {
						border-left: none !important;
						border-right: 1px solid @border !important;
					}

					&.active > a {
						background: white;
						border-left: none !important;
						border-right: 1px solid @border !important;
					}

					&:hover {
						border: none;
					}

					&:first-child {
						border: none;
					}
				}

			}
		}
	}
	
	footer {
		padding: 0 @sidebar-width + 20px 0px 20px;
		
		
	}
	#usage {
		padding: 0 @sidebar-width 0 0;
		
		ul {

			li {
				
				&:first-child {
					border-right: none !important;
				}

				&:last-child {
					border-right: 1px solid #afafaf !important;
				}

				.title, .bar, .desc {float: right;}

				.title {
					text-align: left;
				}	
			}
		}
	}
	
	.todo-list {
		margin-top: -1px;

		ul {
			padding: 5px 0 0 0;

			li {
				padding: 0 25px 0 15px;

				&:before, &:after {
					border-left: 1px dotted @border;
					border-right: 1px dotted @border;
				}

				&:before {
					left: auto;
					right: 8px;
				}

				&:after {
					left: auto;
					right: 10px;
				}

				.custom-checkbox-item {
					margin: 1px -16px 4px 15px;
					float: right !important;
				}
			}
		} 
	}
	
	.calendar {

		.list {

			ul {

				li {
					

					.custom-checkbox-item {
						margin-right: -50px;
					}
					
					.custom-checkbox-desc {
						padding-right: 12px;
					}

					i {
						left: 0;
						right: auto;
						top: 16px;
					}
				}
			}
		}
	}
	
	.discussions {

		ul {

			li {
				margin: 0 80px 20px 40px;

				&:before {
					left: auto;
					right: -20px;
					border-left: 10px solid @border;
					border-top: 10px solid transparent;
					border-bottom: 10px solid transparent;
					border-right: none !important;
				}

				&:after {
					left: auto;
					right: -19px;
					border-left: 10px solid white;
					border-top: 10px solid transparent;
					border-bottom: 10px solid transparent;
					border-right: none !important;
				}

				.author {
					left: 0;
					right: -70px;
				}

				.name {
					right: 10px;
					width: 100%;
				}

				.date {
					left: -1px;
					right: auto;
					padding: 5px 10px 5px 20px;
				}

				.delete {
					left: -30px;
					right: auto;
				}

				ul {
					overflow: hidden;

					li {
						margin: 0 -10px;
						padding-left: 10px;
						padding-right: 70px;

						.author {
							right: 10px;
						}

						.name {
							right: 70px;
						}

						.date {
							left: 30px;
						}

						.delete {
							left: 10px;
						}
					}	
				}	
			}	
		}	
	}
	
	.smallstat {
		i {
			float: right;
			margin-left: 10px;
			margin-right: auto;
		}
	}
	
	.info-box {
		i {
			float: right;
			text-align: center;
			border-right: none;
			border-left: 2px solid rgba(255,255,255,.5);
			margin-left: 20px;
			padding-left: 20px;
			margin-right: auto;
			padding-right: auto;
		}
	}
	
	table.table thead {
		.sorting { background-position: center left; }
		.sorting_asc { background-position: center left; }
		.sorting_desc { background-position: center left; }
		.sorting_asc_disabled { background-position: center left; }
		.sorting_desc_disabled { background-position: center left; }
	}	
	
	@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
		table.table thead {
			.sorting { background-position: center left; }
			.sorting_asc { background-position: center left; }
			.sorting_desc { background-position: center left; }
			.sorting_asc_disabled { background-position: center left; }
			.sorting_desc_disabled { background-position: center left; }	
		}
	}
	
	@media (max-width: 991px) { 

		.navbar {
			padding: 0;

			.navbar-actions {
				margin-right: -15px;
				margin-left: auto;
			}
		}

		.main {
			padding: 90px 30px 0 30px;
		}

		footer {
			padding: 0 20px;
			text-align: center !important;
		}	
	}		
}

@media (max-width: 991px) {
	
	.mm-menu {
		left: auto;
		right: 0;
	}

	.mm-menu > .mm-panel {
		left: auto;
		right: 100%;
	}
	.mm-menu > .mm-panel.mm-opened {
		left: auto;
		right: 0%; 
	}
	.mm-menu > .mm-panel.mm-subopened {
		left: auto;
		right: -40%;
	}
	.mm-list > li:not(.mm-subtitle):not(.mm-label):not(.mm-search):not(.mm-noresults):after {
		left: auto;
		right: 0;
	}
	.mm-list > li:not(.mm-subtitle):not(.mm-label):not(.mm-search):not(.mm-noresults):after {
		left: auto;
		right: auto;
	}
	.mm-list a.mm-subopen:before {
		left: auto;
		right: 0;
	}
	.mm-list a.mm-subopen + a,
	.mm-list a.mm-subopen + span {
		padding-right: 5px;
		margin-right: 40px; 
	}

	.mm-list a.mm-subclose:before {
		left: auto;
		right: 22px;
	}
	
	.mm-page,
	.mm-fixed-top,
	.mm-fixed-bottom,
	.navbar,
	footer {

	  -webkit-transition: none;
	  -moz-transition: none;
	  -ms-transition: none;
	  -o-transition: none;
	  transition: none;}

	.mm-fixed-top,
	.mm-fixed-bottom {
	  	left: auto;
	 	right: 0;
	}

	.mm-menu {
		width: 250px;
	}

	html.mm-opening .mm-page,
	html.mm-opening #mm-blocker,
	html.mm-opening .navbar,
	html.mm-opening footer {
		left: auto;
		right: 250px;
	}	
}

body.sidebar-minified.rtl {
	
	.navbar {
		padding: 0 60px 0 0;
		
		.navbar-actions {
			margin-left: auto;
			margin-right: -15px;
		}
	}
	
	.main {
		width: 100%;
		padding: 90px 90px 30px 30px;
	}
	
	footer {
		padding: 0 80px 0 20px;
	}
	
	#usage {
		padding: 0 60px 0 0;
	}
		
	.sidebar {
		width: 60px;
		
		.sidebar-header {
			
			.user-menu {
				#sidebar-minify {
					bottom: 0 !important;
					left: auto;
					right: 0;
				}
			}
		}
		
		ul.nav.nav-sidebar {
			
			> li {
				
				> a {
										
					.text {
						border-right: none !important;
						border-left: 1px solid #4a4a4a !important;
						padding-right: 15px;
						top: 0px;
						right: 37px;
						left: auto;
						text-align: right;
					}
					 
				}
		
				&:hover {
					
					> ul {
						top: 42px;
						left: auto;
						right: 38px;						
					}					
				}	
			}		
		}
	}	
}

body.sidebar-hidden.rtl {
	
	.navbar {
		padding: 0 0 0 0;
		
		.navbar-actions {
			margin-left: auto;
			margin-right: -15px;
		}
	}
	
	.main {
		width: 100%;
		padding: 90px 30px 30px 30px;
	}	
}

